<%--
  Created by IntelliJ IDEA.
  User: 86181
  Date: 2022/9/7
  Time: 15:25
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head>
    <title>Title</title>
</head>
<script>
    function del(){
        return confirm("不删吧?")
    }
</script>
<body>
<form action="/project/add" method="post">
    <input type="submit" value="添加">
</form>
<table align="center" width="80%" border="1px" bgcolor="#ff8c00">
    <tr>
        <td>id</td>
        <td>工程名称</td>
        <td>开始时间</td>
        <td>结束时间</td>
        <td>开发商名称</td>
        <td>承建商名称</td>
        <td>修改时间</td>
        <td colspan="2">操作</td>
    </tr>

    <%--c标签循环遍历--%>
    <c:forEach items="${projects}" var="project" >
        <tr>
            <td>${project.pid}</td>
            <td>${project.pname}</td>
            <td><fmt:formatDate value="${project.starttime}"></fmt:formatDate></td>
            <td><fmt:formatDate value="${project.endtime}"></fmt:formatDate></td>
            <td>${project.did}</td>
            <td>${project.cid}</td>
            <td><fmt:formatDate value="${project.updatetime}"></fmt:formatDate></td>
            <td><a href="/project/delete?pid=${project.pid}"><span  onclick="return del()" >删除</span></a></td><td>修改</td>
        </tr>
    </c:forEach>



</table>


</body>
</html>
